Integrand size = 32, antiderivative size = 94 \[ \int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {3 a^2 c^3 \text {arctanh}(\sin (e+f x))}{8 f}-\frac {3 a^2 c^3 \sec (e+f x) \tan (e+f x)}{8 f}+\frac {a^2 c^3 \sec (e+f x) \tan ^3(e+f x)}{4 f}-\frac {a^2 c^3 \tan ^5(e+f x)}{5 f} \]
3/8*a^2*c^3*arctanh(sin(f*x+e))/f-3/8*a^2*c^3*sec(f*x+e)*tan(f*x+e)/f+1/4* a^2*c^3*sec(f*x+e)*tan(f*x+e)^3/f-1/5*a^2*c^3*tan(f*x+e)^5/f
Time = 0.45 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.87 \[ \int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {a^2 c^3 \left (120 \text {arctanh}(\sin (e+f x))-\sec ^5(e+f x) (40 \sin (e+f x)+10 \sin (2 (e+f x))-20 \sin (3 (e+f x))+25 \sin (4 (e+f x))+4 \sin (5 (e+f x)))\right )}{320 f} \]
(a^2*c^3*(120*ArcTanh[Sin[e + f*x]] - Sec[e + f*x]^5*(40*Sin[e + f*x] + 10 *Sin[2*(e + f*x)] - 20*Sin[3*(e + f*x)] + 25*Sin[4*(e + f*x)] + 4*Sin[5*(e + f*x)])))/(320*f)
Time = 0.34 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.86, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {3042, 4446, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (e+f x) (a \sec (e+f x)+a)^2 (c-c \sec (e+f x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^2 \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3dx\) |
\(\Big \downarrow \) 4446 |
\(\displaystyle a^2 c^2 \int \left (c \sec (e+f x) \tan ^4(e+f x)-c \sec ^2(e+f x) \tan ^4(e+f x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^2 c^2 \left (\frac {3 c \text {arctanh}(\sin (e+f x))}{8 f}-\frac {c \tan ^5(e+f x)}{5 f}+\frac {c \tan ^3(e+f x) \sec (e+f x)}{4 f}-\frac {3 c \tan (e+f x) \sec (e+f x)}{8 f}\right )\) |
a^2*c^2*((3*c*ArcTanh[Sin[e + f*x]])/(8*f) - (3*c*Sec[e + f*x]*Tan[e + f*x ])/(8*f) + (c*Sec[e + f*x]*Tan[e + f*x]^3)/(4*f) - (c*Tan[e + f*x]^5)/(5*f ))
3.1.12.3.1 Defintions of rubi rules used
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(c sc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m Int[ExpandTrig[csc[e + f*x]*cot[e + f*x]^(2*m), (c + d*csc[e + f*x])^(n - m ), x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[b*c + a*d, 0] && Eq Q[a^2 - b^2, 0] && IntegersQ[m, n] && GeQ[n - m, 0] && GtQ[m*n, 0]
Result contains complex when optimal does not.
Time = 6.15 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.52
method | result | size |
risch | \(\frac {i a^{2} c^{3} \left (25 \,{\mathrm e}^{9 i \left (f x +e \right )}-40 \,{\mathrm e}^{8 i \left (f x +e \right )}+10 \,{\mathrm e}^{7 i \left (f x +e \right )}-80 \,{\mathrm e}^{4 i \left (f x +e \right )}-10 \,{\mathrm e}^{3 i \left (f x +e \right )}-25 \,{\mathrm e}^{i \left (f x +e \right )}-8\right )}{20 f \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )^{5}}-\frac {3 a^{2} c^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{8 f}+\frac {3 a^{2} c^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{8 f}\) | \(143\) |
parts | \(\frac {a^{2} c^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )}{f}-\frac {a^{2} c^{3} \tan \left (f x +e \right )}{f}-\frac {a^{2} c^{3} \sec \left (f x +e \right ) \tan \left (f x +e \right )}{f}-\frac {2 a^{2} c^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )}{f}+\frac {a^{2} c^{3} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )}{f}\) | \(163\) |
norman | \(\frac {\frac {3 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}-\frac {7 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 f}+\frac {32 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{5 f}+\frac {7 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{2 f}-\frac {3 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{4 f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{5}}-\frac {3 a^{2} c^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{8 f}+\frac {3 a^{2} c^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{8 f}\) | \(173\) |
parallelrisch | \(-\frac {\left (\left (\frac {15 \cos \left (f x +e \right )}{2}+\frac {15 \cos \left (3 f x +3 e \right )}{4}+\frac {3 \cos \left (5 f x +5 e \right )}{4}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+\left (-\frac {15 \cos \left (f x +e \right )}{2}-\frac {15 \cos \left (3 f x +3 e \right )}{4}-\frac {3 \cos \left (5 f x +5 e \right )}{4}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\sin \left (2 f x +2 e \right )-2 \sin \left (3 f x +3 e \right )+\frac {5 \sin \left (4 f x +4 e \right )}{2}+\frac {2 \sin \left (5 f x +5 e \right )}{5}+4 \sin \left (f x +e \right )\right ) a^{2} c^{3}}{2 f \left (\cos \left (5 f x +5 e \right )+5 \cos \left (3 f x +3 e \right )+10 \cos \left (f x +e \right )\right )}\) | \(182\) |
derivativedivides | \(\frac {a^{2} c^{3} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )+a^{2} c^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-2 a^{2} c^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )-2 a^{2} c^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-a^{2} c^{3} \tan \left (f x +e \right )+a^{2} c^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\) | \(192\) |
default | \(\frac {a^{2} c^{3} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )+a^{2} c^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-2 a^{2} c^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )-2 a^{2} c^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-a^{2} c^{3} \tan \left (f x +e \right )+a^{2} c^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}\) | \(192\) |
1/20*I*a^2*c^3*(25*exp(9*I*(f*x+e))-40*exp(8*I*(f*x+e))+10*exp(7*I*(f*x+e) )-80*exp(4*I*(f*x+e))-10*exp(3*I*(f*x+e))-25*exp(I*(f*x+e))-8)/f/(1+exp(2* I*(f*x+e)))^5-3/8*a^2*c^3/f*ln(exp(I*(f*x+e))-I)+3/8*a^2*c^3/f*ln(exp(I*(f *x+e))+I)
Time = 0.29 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.54 \[ \int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {15 \, a^{2} c^{3} \cos \left (f x + e\right )^{5} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, a^{2} c^{3} \cos \left (f x + e\right )^{5} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (8 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} + 25 \, a^{2} c^{3} \cos \left (f x + e\right )^{3} - 16 \, a^{2} c^{3} \cos \left (f x + e\right )^{2} - 10 \, a^{2} c^{3} \cos \left (f x + e\right ) + 8 \, a^{2} c^{3}\right )} \sin \left (f x + e\right )}{80 \, f \cos \left (f x + e\right )^{5}} \]
1/80*(15*a^2*c^3*cos(f*x + e)^5*log(sin(f*x + e) + 1) - 15*a^2*c^3*cos(f*x + e)^5*log(-sin(f*x + e) + 1) - 2*(8*a^2*c^3*cos(f*x + e)^4 + 25*a^2*c^3* cos(f*x + e)^3 - 16*a^2*c^3*cos(f*x + e)^2 - 10*a^2*c^3*cos(f*x + e) + 8*a ^2*c^3)*sin(f*x + e))/(f*cos(f*x + e)^5)
\[ \int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=- a^{2} c^{3} \left (\int \left (- \sec {\left (e + f x \right )}\right )\, dx + \int \sec ^{2}{\left (e + f x \right )}\, dx + \int 2 \sec ^{3}{\left (e + f x \right )}\, dx + \int \left (- 2 \sec ^{4}{\left (e + f x \right )}\right )\, dx + \int \left (- \sec ^{5}{\left (e + f x \right )}\right )\, dx + \int \sec ^{6}{\left (e + f x \right )}\, dx\right ) \]
-a**2*c**3*(Integral(-sec(e + f*x), x) + Integral(sec(e + f*x)**2, x) + In tegral(2*sec(e + f*x)**3, x) + Integral(-2*sec(e + f*x)**4, x) + Integral( -sec(e + f*x)**5, x) + Integral(sec(e + f*x)**6, x))
Leaf count of result is larger than twice the leaf count of optimal. 227 vs. \(2 (86) = 172\).
Time = 0.21 (sec) , antiderivative size = 227, normalized size of antiderivative = 2.41 \[ \int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=-\frac {16 \, {\left (3 \, \tan \left (f x + e\right )^{5} + 10 \, \tan \left (f x + e\right )^{3} + 15 \, \tan \left (f x + e\right )\right )} a^{2} c^{3} - 160 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{2} c^{3} + 15 \, a^{2} c^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 120 \, a^{2} c^{3} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 240 \, a^{2} c^{3} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) + 240 \, a^{2} c^{3} \tan \left (f x + e\right )}{240 \, f} \]
-1/240*(16*(3*tan(f*x + e)^5 + 10*tan(f*x + e)^3 + 15*tan(f*x + e))*a^2*c^ 3 - 160*(tan(f*x + e)^3 + 3*tan(f*x + e))*a^2*c^3 + 15*a^2*c^3*(2*(3*sin(f *x + e)^3 - 5*sin(f*x + e))/(sin(f*x + e)^4 - 2*sin(f*x + e)^2 + 1) - 3*lo g(sin(f*x + e) + 1) + 3*log(sin(f*x + e) - 1)) - 120*a^2*c^3*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin(f*x + e) - 1)) - 240*a^2*c^3*log(sec(f*x + e) + tan(f*x + e)) + 240*a^2*c^3*tan(f*x + e))/ f
Time = 0.37 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.69 \[ \int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {15 \, a^{2} c^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right ) - 15 \, a^{2} c^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right ) - \frac {2 \, {\left (15 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} - 70 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 128 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 70 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 15 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{5}}}{40 \, f} \]
1/40*(15*a^2*c^3*log(abs(tan(1/2*f*x + 1/2*e) + 1)) - 15*a^2*c^3*log(abs(t an(1/2*f*x + 1/2*e) - 1)) - 2*(15*a^2*c^3*tan(1/2*f*x + 1/2*e)^9 - 70*a^2* c^3*tan(1/2*f*x + 1/2*e)^7 - 128*a^2*c^3*tan(1/2*f*x + 1/2*e)^5 + 70*a^2*c ^3*tan(1/2*f*x + 1/2*e)^3 - 15*a^2*c^3*tan(1/2*f*x + 1/2*e))/(tan(1/2*f*x + 1/2*e)^2 - 1)^5)/f
Time = 18.31 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.99 \[ \int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {-\frac {3\,a^2\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9}{4}+\frac {7\,a^2\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{2}+\frac {32\,a^2\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{5}-\frac {7\,a^2\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{2}+\frac {3\,a^2\,c^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )}+\frac {3\,a^2\,c^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{4\,f} \]
((32*a^2*c^3*tan(e/2 + (f*x)/2)^5)/5 - (7*a^2*c^3*tan(e/2 + (f*x)/2)^3)/2 + (7*a^2*c^3*tan(e/2 + (f*x)/2)^7)/2 - (3*a^2*c^3*tan(e/2 + (f*x)/2)^9)/4 + (3*a^2*c^3*tan(e/2 + (f*x)/2))/4)/(f*(5*tan(e/2 + (f*x)/2)^2 - 10*tan(e/ 2 + (f*x)/2)^4 + 10*tan(e/2 + (f*x)/2)^6 - 5*tan(e/2 + (f*x)/2)^8 + tan(e/ 2 + (f*x)/2)^10 - 1)) + (3*a^2*c^3*atanh(tan(e/2 + (f*x)/2)))/(4*f)